import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '../views/Home/Home.vue'
import HeSuan from '../views/HeSuan/index'
import Area from '../views/Area/index'
import Prevention from '../views/Prevention/index'
import Citys from '../views/Citys/Citys.vue'
import Travel from '../views/Travel/Travel.vue'
import SelectCity from '../views/SelectCity/SelectCity.vue'
Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name: 'home',
    component: Home
  },
  {
    path: '/hesuan',
    name: 'HeSuan',
    component: HeSuan
  },
  {
    path: '/area',
    name: 'Area',
    component: Area
  },
  {
    path: '/prevention',
    name: 'Prevention',
    component: Prevention
  },
  {
    path: '/citys/:cityname',
    name: 'Citys',
    component: Citys,
    props: true,
  },
  {
    path: '/travel',
    name: 'Travel',
    component: Travel
  },
  {
    path: '/selectCity',
    name: 'SelectCity',
    component: SelectCity
  },

]

const router = new VueRouter({
  routes
})

export default router
